#ifndef __SYS_CALL_H
#define __SYS_CALL_H
#include"global.h"
#include"thread.h"
#include"file.h"

enum SYSCALL_NR{
	NR_GETPID,
	NR_FORK,
	NR_EXEC,
	NR_CLEAR,
	NR_READ,
	NR_WRITE,
	NR_GETCWD,
	NR_MKDIR,
	NR_OPENDIR,
	NR_CLOSEDIR,
	NR_READDIR,
	NR_REWINDDIR,
	NR_RMDIR,
	NR_CHDIR,
	NR_STAT,
	NR_PS,
	NR_PUTCHAR,
	NR_MALLOC,
	NR_FREE,
	NR_WAIT,
	NR_EXIT
};
pid_t getpid(void);
pid_t fork(void);
int32_t execv(const char*,char**);
void clear(void);
int read(int fd,void* buffer,int len);
int write(int fd,void* buffer,int len);
char* getcwd(char*,uint32_t);
int32_t mkdir(const char*);
int32_t rmdir(const char*);
int32_t chdir(const char*);
struct dir* opendir(const char*);
int32_t closedir(struct dir*);
struct dir_entry* readdir(struct dir*);
void rewinddir(struct dir*);
int32_t stat(const char*,struct stat*);
void ps(void);
void putchar(char c);
void* malloc(uint32_t size);
void free(void* addr);
pid_t wait(int32_t *status);
void exit(int status);
#endif
